<?php

namespace Home\Model\Ajax;

class PmsSend extends AbstractAjax
{
    // PMS
    public function handle()
    {
        $to_uid = I('request.uid', '0', 'intval');
        if (empty($this->uid) || empty($to_uid)) {
            $ajax['status']  = 0;
            $ajax['content'] = "获取UID失败";
            return $ajax;
        }
        if ($to_uid == $this->uid) {
            $ajax['status']  = 0;
            $ajax['content'] = "自己不能给自己私信！";
            return $ajax;
        }
        $user = D('User')->get_user_one($to_uid);
        $this->assign('user', $user);
        $html            = $this->fetch('ajax_pms');
        $ajax['status']  = 1;
        $ajax['content'] = $html;
        return $ajax;
    }

}